<?php
/**
 * Created by PhpStorm.
 * User: coolinmind
 * Date: 21/01/2019
 * Time: 14:33
 */

namespace App\Services\UCenter;


use App\Services\ProjectValidate;

class ValidateCar extends ProjectValidate
{

    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {
        // TODO: Implement initValidate() method.
    }
    /**
     * @var array 验证规则集合
     */
    public $rules = [
        'id'                => 'int|min:1',
        'user_id'           => 'required',
        'plate_type'           => 'required',
        'number' => 'required',
        'driving_license' => 'required',
        'weight'           => 'required',
        'volume'           => 'required',
        'car_lenght'           => 'required',
        'car_type'           => 'required',
        'price'           => 'required',
        'loading_time'           => 'required',
        'page' => 'required|int',
        'carriage_num' => 'required',
        'carrage_length' => 'required',
        'register_date' => 'required',
        'car_brand' => 'required',
        'identification_code' => 'required',
        'engine' => 'required',
        'engine_num' => 'required',
        'axle' => 'required',
        'owner' => 'required',
        'is_allow' => 'required|int',
        'certificate' => 'required'
    ];

    /**
     * @var array 当前验证错误信息
     */
    public $messages = [
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
        'id'   => 'ID',
    ];
}
